package com.hn.shopadmin.dto;

import java.util.ArrayList;
import java.util.List;

public class Test {
    public List<Tt> list;

    public Test() {
        this.list = new ArrayList<Tt>();
    }

    public Tt creatTt(){
        Tt tt = new Tt();
        if (list == null || list.size() == 0){
            list.add(tt);
        }
        return tt;
    }

    public void addTt(Tt tt){
        list.add(tt);
    }

    @Override
    public String toString() {
        return "Test{" +
                "list=" + list +
                '}';
    }

    public static class Tt{
        public String name;
        public String id;
        public String sex;

        protected Tt(){};
        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getSex() {
            return sex;
        }

        public void setSex(String sex) {
            this.sex = sex;
        }

        @Override
        public String toString() {
            return "Tt{" +
                    "name='" + name + '\'' +
                    ", id='" + id + '\'' +
                    ", sex='" + sex + '\'' +
                    '}';
        }
    }

}
